"
I'm an abstract class grouping the behavior of the code declarations that will be installed in a behavior, such as methods, class comments, organizations...
"
Class {
	#name : 'BehaviorOwnedChunk',
	#superclass : 'CodeChunk',
	#instVars : [
		'behaviorName',
		'isMeta',
		'metadata'
	],
	#category : 'CodeImport-Chunks',
	#package : 'CodeImport',
	#tag : 'Chunks'
}

{ #category : 'testing' }
BehaviorOwnedChunk class >> isAbstract [

	^ self == BehaviorOwnedChunk
]

{ #category : 'accessing' }
BehaviorOwnedChunk >> behaviorName [

	^ behaviorName
]

{ #category : 'accessing' }
BehaviorOwnedChunk >> behaviorName: aBehaviorName [

	behaviorName := aBehaviorName
]

{ #category : 'testing' }
BehaviorOwnedChunk >> existsBehavior [

	^ self class environment includesKey: behaviorName
]

{ #category : 'accessing' }
BehaviorOwnedChunk >> isMeta [

	^ isMeta
]

{ #category : 'accessing' }
BehaviorOwnedChunk >> isMeta: aBoolean [

	isMeta := aBoolean
]

{ #category : 'accessing' }
BehaviorOwnedChunk >> metadata [

	^ metadata
]

{ #category : 'accessing' }
BehaviorOwnedChunk >> metadata: anObject [

	metadata := anObject
]

{ #category : 'accessing' }
BehaviorOwnedChunk >> targetClass [

	| target |
	target := self class environment at: behaviorName.
	^ isMeta
		  ifTrue: [ target classSide ]
		  ifFalse: [ target ]
]
